<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body style="">
<OBJECT ID='x' style="display:none;" name='x' CLASSID='CLSID:0D2BE633-A7F8-4DB1-A25B-EC610EA2ADEA' hspace=0 vspace=0 ></OBJECT>
<input type="button" value="信息" onclick="show();"/>
<input type="button" value="当前状态" onclick="setMsg('zz');"/>
<input type="button" value="拨出" onclick="dial();"/>
<input type="button" value="挂断" onclick="hangUp();" />
<script language="javascript" event="OnCallIn(aa);" for="x">
        alert(aa);
</script>
<script language="javascript" event="OnCallOut(aa);" for="x">
        alert(aa);
</script>
<script language="javascript" event="OnHangUp(teleNo);" for="x">
        alert(teleNo);
</script>
<script language="javascript" event="OnDeviceDisconnected();" for="x">
        tele.Connected = false;
</script>
<script type="text/javascript">
var x=document.getElementById('x');
var tele = {};
tele.OutsideLineNo = '9';
tele.Connected = false;

function initTeleConfig() {
	x.InitTeleDevice();
	x.OutsideLineNo = '9';
	tele.Connected = x.DeviceConnected;
}

initTeleConfig();

function setMsg(a) {
	x.LastMsg=a;
}
function show() {
	alert(x.CallingTeleNo);
}
function dial(){
	if (!tele.Connected) {
		initTeleConfig();
		alert('init tele');
	}
	if (tele.Connected && x.DeviceConnected) {
    	x.CallOut('13058189309');
	} else {
		tele.Connected = false;
		alert('设备连接不正常，请检查电话与电脑的链接。');
	}
}
function hangUp(){
    x.hangUp();
}
</script>
<div style="text-align:center; margin-top:20px;">
<img src="style/welcome.jpg" />
</div>
</body>
</html>
